package org.jeecg.modules.yinsheng.command.division;

import java.util.List;

import org.jeecg.modules.yinsheng.annotation.Length;
import org.jeecg.modules.yinsheng.annotation.NotBlank;
import org.jeecg.modules.yinsheng.annotation.Pattern;
import org.jeecg.modules.yinsheng.command.base.BaseDivisionReqCommand;

/**
 * @ClassName OnlineDivisionRegisterReqCommand
 * @Description 分账登记请求
 * @Author linxl
 * @Date 2021/6/4 16:41
 * @Version 1.0
 */

public class OnlineDivisionRegisterReqCommand extends BaseDivisionReqCommand<OnlineDivisionRegisterReqCommand> {

	private static final long serialVersionUID = 2006832992627392488L;

	// 收款方商户号（长度32）(必填)
	@NotBlank(message = "收款方商户号不能为空")
	@Length(max = 32, message = "收款方商户号最大长度不能超过32个字符")
	private String merchantNo;

	// 收款方机构号（长度20）(必填)
	@NotBlank(message = "收款方机构号不能为空")
	@Length(max = 20, message = "收款方机构号最大长度不能超过20个字符")
	private String organizationNo;

	// 原交易金额，20长度位，保留2位小数
	@NotBlank(message = "原交易金额不能为空")
	@Pattern(regexp = "^([0-9]+|[0-9]{1,3}(,[0-9]{3})*)(.[0-9]{1,2})?$", message = "交易金额格式不正确")
	private String origAmount;

	// 回调通知地址
	@NotBlank(message = "回调通知地址不能为空")
	private String backUrl;

	// 分账模式（01：比例，02：金额）
	@NotBlank(message = "分账模式不能为空")
	private String divisionMode;

	// 是否参与分账（01：是，02否）
	@NotBlank(message = "是否参与分账不能为空")
	private String isDivision;

	@NotBlank(message = "是否重新分账交易不能为空")
	// 是否重新分账交易：Y：是，N：否，当交易和分账日期不是同一天时填Y
	private String isAgainDivision;

	// 分账明细，是否参与分账为01时不能为空
	private List<DivisionDetailsSub> divisionList;

	public String getBackUrl() {
		return backUrl;
	}

	public OnlineDivisionRegisterReqCommand setBackUrl(String backUrl) {
		this.backUrl = backUrl;
		return this;
	}

	public String getDivisionMode() {
		return divisionMode;
	}

	public OnlineDivisionRegisterReqCommand setDivisionMode(String divisionMode) {
		this.divisionMode = divisionMode;
		return this;
	}

	public String getIsAgainDivision() {
		return isAgainDivision;
	}

	public OnlineDivisionRegisterReqCommand setIsAgainDivision(String isAgainDivision) {
		this.isAgainDivision = isAgainDivision;
		return this;
	}

	public String getOrigAmount() {
		return origAmount;
	}

	public OnlineDivisionRegisterReqCommand setOrigAmount(String origAmount) {
		this.origAmount = origAmount;
		return this;
	}

	public String getIsDivision() {
		return isDivision;
	}

	public OnlineDivisionRegisterReqCommand setIsDivision(String isDivision) {
		this.isDivision = isDivision;
		return this;
	}

	public List<DivisionDetailsSub> getDivisionList() {
		return divisionList;
	}

	public OnlineDivisionRegisterReqCommand setDivisionList(List<DivisionDetailsSub> divisionList) {
		this.divisionList = divisionList;
		return this;
	}

	public String getMerchantNo() {
		return merchantNo;
	}

	public OnlineDivisionRegisterReqCommand setMerchantNo(String merchantNo) {
		this.merchantNo = merchantNo;
		return this;
	}

	public String getOrganizationNo() {
		return organizationNo;
	}

	public OnlineDivisionRegisterReqCommand setOrganizationNo(String organizationNo) {
		this.organizationNo = organizationNo;
		return this;
	}
}
